package cn.krund.lyc.hotlerobot.activity.base;

import android.app.Application;

import com.iflytek.cloud.SpeechConstant;
import com.iflytek.cloud.SpeechUtility;

import cn.krund.lyc.hotlerobot.R;
import cn.krund.lyc.hotlerobot.utils.CrashHandler;

/**
 * @包名: cn.krund.lyc.hotlerobot.activity
 * @作者: 刘育成
 * @时间: 2018/3/16  17:21
 * @org: 克路德人工智能
 * @描述: TODO
 * @fileName: App
 */

public class App extends Application {
    private static App app;

    @Override
    public void onCreate() {
//        Tools.startProgroamLogo(getApplicationContext());
        app = App.this;
        StringBuffer param = new StringBuffer();
        param.append("appid=" + getString(R.string.app_id));
        param.append(",");
        // 设置使用v5+
        param.append(SpeechConstant.ENGINE_MODE + "=" + SpeechConstant.MODE_MSC);
        SpeechUtility.createUtility(App.getInstance(), param.toString());
        super.onCreate();
        CrashHandler crashHandler=CrashHandler.getInstance();
//        crashHandler.init(getApplicationContext());
    }

    public static App getInstance() {
        return app;
    }
}
